<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #demo {
            width: 0;
            height: 0;
            border: 30px solid red;
            border-left: 30px solid transparent;
            border-right: 30px solid transparent;
            border-top: 30px solid transparent;
        }
        
        #demo2 {
            width: 0;
            height: 0;
            border: 30px solid red;
            border-right: 30px solid transparent;
            border-top: 30px solid transparent;
        }
    </style>
</head>

<body>
    <!-- 等腰三角 -->
    <div id="demo">

    </div>

    <hr>

    <!-- 直角三角 -->
    <div id="demo2">

    </div>
</body>

</html>